cat <<EOF > /root/install_tools.sh

mkdir /root/xvdd
mount /dev/sr0 /root/xvdd/
cd /root/xvdd/
cp vmtools-3.0.0.061.tar.bz2 /root/
cp vmtools-3.0.0.061.tar.gz /root/
cd /root/
tar -xjvf vmtools-3.0.0.061.tar.bz2
tar -xzvf vmtools-3.0.0.061.tar.gz
cd /root/vmtools/
./install
EOF

bash /root/install_tools.sh


cat <<EOF > /root/install_tools.sh
ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/id_rsa -q <<<y >/dev/null 2>&1
sshpass -p "Huawei12#$" ssh-copy-id -i /root/.ssh/id_rsa.pub -o StrictHostKeyChecking=no root@168.17.100.17
scp -r root@168.17.100.17:/home/data_mnt/wubian_data/vmtools /root
cd /root/vmtools 
tar -xjvf vmtools-3.0.0.061.tar.bz2
tar -xzvf vmtools-3.0.0.061.tar.gz
cd /root/vmtools/vmtools
./install
EOF
bash /root/install_tools.sh
